﻿using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.game
{
    public class VoteDissolveRoomResultReq : Message
    {
        public static int TYPE = 12;
        public static int ID = 22;

        public bool Result { get; set; }
        public  int UserID { get; set; }

        public void decode(Input _in)
        {
        }

        public void encode(Output _out)
        {
            _out.writeBoolean(Result);
            _out.writeInt(UserID);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "VoteDissolveRoomResultReq[Result=" + Result + ", UserID=" + UserID + ", ]";
        }

        public static VoteDissolveRoomResultReq create(bool result, int locationIndex)
        {
            var vdrr = new VoteDissolveRoomResultReq();
            vdrr.Result = result;
            vdrr.UserID = locationIndex;
            return vdrr;
        }
    }
}